<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<%@ taglib prefix="sjg" uri="/struts-jquery-grid-tags"%>

<script type="text/javascript">
    var rowId = 0;
    $('fbox_sourceofincomeGrid .ui-reset , #refresh_sourceofincomeGrid').click(function(){
        $("#sourceofincomeGrid").jqGrid('setGridParam',{search:false});
        var postData = $("#sourceofincomeGrid").jqGrid('getGridParam','postData');
        $.extend(postData,{searchField:"",searchString:"",searchOper:""});
        $.extend(postData,{filters:""});
        $("#sourceofincomeGrid").trigger("reloadGrid");
    });

    $.subscribe('searchsourceofincomeGrid', function(event,data) {
        $("#sourceofincomeGrid").jqGrid('searchGrid', {closeAfterSearch:true,closeOnEscape:true,sopt:['eq'],caption:"Search sourceofincome"} );
    });
    
    $.subscribe('sourceofincomeGridComplete',function(event,data){
        $( "#sourceofincomeGrid_search" ).button( "option", "disabled", false );
    });

</script>
<div class="gridOptsContainer">
    <sj:submit button="true" cssStyle="font-size:14px;" disabled="true" id="sourceofincomeGrid_search" onClickTopics="searchsourceofincomeGrid" value="Search sourceofincome"/>
</div>
<s:url id="remoteurl" action="grid-sourceofincome"/>

<sjg:grid
    id="sourceofincomeGrid"
    caption="Cashmate sourceofincome"
    cellEdit="true"
    dataType="json"
    href="%{remoteurl}"
    cellurl="%{editurl}"
    gridModel="gridModel"
    pagerButtons="true"
    pagerInput="true"
    rowList="15,30,50"
    rowNum="15"
    loadingText="Requesting Data..."
    width="970"
    shrinkToFit="true"
    pager="true"
    hoverrows="true"
    rownumbers="true"
    autoencode="true"
    viewrecords="true"
    navigator="true"
    navigatorAdd="false"
    navigatorDelete="false"
    navigatorEdit="false"
    navigatorSearch="true"
    navigatorSearchOptions="{closeAfterSearch:true,closeOnEscape:true,sopt:['eq'],caption:'Search sourceofincome'}"
    navigatorView="true"
    onGridCompleteTopics="sourceofincomeGridComplete"
    >

    <sjg:gridColumn name="sourceid"
                    index="sourceid"
                    title="Source ID"
                    sortable="false"
                    key="true"
                    hidden="true"
                    />

    <sjg:gridColumn name="type"
                    index="type"
                    title="Type"
                    sortable="true"
                    align="center"
                    />

</sjg:grid>